package com.zzc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zzc.domain.User;
import com.zzc.mapper.UserMapper;
import com.zzc.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Zzc
 * @since 2020-08-01
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User loginAuthentication(String userAccount) {

        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("user_account",userAccount);

        User user = userMapper.selectOne(wrapper);

        return user;
    }
}
